
<?php
require_once  __DIR__ . '/includes/authenticate.php';
include_once './db_bb_connect.php';

?>

   
<style type="text/css">
	.panel{
		font-size:15px;
	}

	.list-group-item{
		border:none;
	}


</style>

<h2 class="hidden-print">Player Profile Viewer</h2>

<div id="container-fluid">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">

<center>
  <button class="btn btn-primary hidden-print" id="viewprofile" >View Profile</button>
  <button class="btn btn-primary hidden-print" id="addnewnote" >Add New Note</button>

</center>
<div id="playerprofilecontent"></div>

<div class="col-md-3"></div>
</div>

 </div>
 </div>

 <br>

 

<script type="text/javascript">

function myFunction() {
    window.print();
}

$("#addnewnote").on("click", function(e) {
	$.ajax({
  type: "GET",
  url: "./playerprofile_add.php",
  success: function(data) {
    $("#playerprofilecontent").html(data);
  },
  error: function (xhr, status, error) {
    $("#playerprofilecontent").html(xhr.responseText); 
  }
  }); 
  e.preventDefault();
});

$("#viewprofile").on("click", function(e) {
  $.ajax({
  type: "GET",
  url: "./playerprofile_selectseason.php",
  success: function(data) {
    $("#playerprofilecontent").html(data);

  },
  error: function (xhr, status, error) {
    $("#playerprofilecontent" ).html(xhr.responseText); 
  }
  }); 
  e.preventDefault();
});

</script>

